#ifndef DDLOGINUSERINFO_H
#define DDLOGINUSERINFO_H

#include "PlanGlobal.h"
#include "PlanStruct.h"
#include <QObject>

class PLAN_EXPORT LoginUserInfo : public QObject
{
	Q_OBJECT

protected:
	LoginUserInfo(QObject *parent = 0);
	~LoginUserInfo();

public:
	bool initLoginUserInfo(QString userid,QString username);
	void clearLoginUserInfo();
	static LoginUserInfo * getInstance();

	QString getUserName();
	QString getUserId();
	QString getDeptName();
	QString getDeptId();
	QString getPasswd();
	QString getCompanyId();
	QString getCompanyName();
	UserOrganInfo getUserOrganInfo();

private:
	bool readUserInfo();

private:
	UserOrganInfo userOrganInfo;
	static LoginUserInfo * sysRecords;
};

#endif